ascat raw segments txt files added to output#126
ascat raw segments txt files added to output#126AmberVerhasselt merged 5 commits intoIntGenomicsLab:devfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the nf-core ascat module to include the raw segmentation table (*.segments_raw.txt) as an explicit module output, and documents that additional output in the pipeline results documentation.
Changes:
- Add
segments_rawto theASCATmodule test snapshots (main.nf.test) to validate the new output. - Fix/ensure the
segments_rawfile is written with the correctprefixinterpolation in the module R script, and create a stubsegments_rawfile in stub mode. - Document
sample.segments_raw.txtindocs/output.md.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| modules/nf-core/ascat/tests/main.nf.test | Extends snapshot assertions to include the new segments_raw output. |
| modules/nf-core/ascat/main.nf | Writes ${prefix}.segments_raw.txt (guarded) and includes it in stub outputs. |
| modules/nf-core/ascat/ascat.diff | Regenerates the recorded module diff to reflect the segments_raw additions. |
| docs/output.md | Adds sample.segments_raw.txt to the documented pipeline outputs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // This discrepancy affect the png generated | ||
| process.out.png.collect{it[1].collect{file(it).name}}, | ||
| process.out.purityploidy, | ||
| process.out.segments, | ||
| process.out.segments_raw, | ||
| process.out.versions, | ||
| path(process.out.versions[0]).yaml |
There was a problem hiding this comment.
snapshot(...).match() snapshots are order/arity sensitive. This test adds process.out.segments_raw to the snapshot inputs, but the corresponding modules/nf-core/ascat/tests/main.nf.test.snap file was not updated, so these tests will fail until the snapshot is re-recorded/updated to include the new output (or the snapshot assertion is adjusted).
There was a problem hiding this comment.
@AmberVerhasselt Normally, if you change anything in the test (now you added an additional file that needs to exist after testing), the test should be updated.
Modules are typically tested to see if the output matches a previous test run (=snapshot). If you change anything in the module/test assertion, if will no longer match this snapshot.
You can test a module by running nf-core modules test ascat --profile singularity if you need to update the snapshot that it will compare to you can run it nf-core modules test ascat --profile singularity --update. Since ASCAT is not in the test config, we can ignore this now. So use this as an FYI for future module updates.
docs/output.md
Outdated
| | `sample.normal_alleleFrequencies_chr(1-22,X).txt` | a tsv file describing the snp counts for the normal sample at each position and their respective depths | | ||
| | `sample.purityploidy.txt` | a tsv file describing the purity and ploidy values of the sample | | ||
| | `sample.segments.txt` | a tsv file describing each chromosome segment and it's major and minor copy number | | ||
| | `sample.segments_raw.txt` | a tsv file describing each chromosome segment and it's major and minor rounded and raw copy number | |
There was a problem hiding this comment.
The new sample.segments_raw.txt description has a grammar issue (“it's” → “its”) and reads ambiguously (“rounded and raw copy number”). Consider rewording to something like “... its major/minor copy numbers (rounded and raw)” and trimming the extra spacing so the markdown table stays aligned.
ljwharbers
left a comment
There was a problem hiding this comment.
Once all tests pass (can ignore template version test), feel free to merge.
| // This discrepancy affect the png generated | ||
| process.out.png.collect{it[1].collect{file(it).name}}, | ||
| process.out.purityploidy, | ||
| process.out.segments, | ||
| process.out.segments_raw, | ||
| process.out.versions, | ||
| path(process.out.versions[0]).yaml |
There was a problem hiding this comment.
@AmberVerhasselt Normally, if you change anything in the test (now you added an additional file that needs to exist after testing), the test should be updated.
Modules are typically tested to see if the output matches a previous test run (=snapshot). If you change anything in the module/test assertion, if will no longer match this snapshot.
You can test a module by running nf-core modules test ascat --profile singularity if you need to update the snapshot that it will compare to you can run it nf-core modules test ascat --profile singularity --update. Since ASCAT is not in the test config, we can ignore this now. So use this as an FYI for future module updates.
PR checklist
nf-core pipelines lint).nextflow run . -profile test,docker --outdir <OUTDIR>).nextflow run . -profile debug,test,docker --outdir <OUTDIR>).docs/usage.mdis updated.docs/output.mdis updated.CHANGELOG.mdis updated.README.mdis updated (including new tool citations and authors/contributors).